Adwaita: Fix and simplify infobar styling
authornana-4 <hnmaigo@gmail.com>
Sat, 18 Apr 2020 06:14:53 +0000 (15:14 +0900)
committernana-4 <hnmaigo@gmail.com>
Sun, 19 Apr 2020 11:10:52 +0000 (20:10 +0900)
- Apply sizing regardless of style class.
- Fix bottom border not reaching the bottom corners.
- Remove unnecessary style overrides that should have been removed
  during the redesign.

gtk/theme/Adwaita/_common.scss

index f92ae171c9c86fe53416a881bbebe5c6e43376c8..253827892254b62f31abb84e164d8908a95c66a0 100644 (file)
@@ -3814,63 +3814,25 @@ video {
  * GtkInfoBar *
  **************/
 infobar {
-  border-style: none;
+  > revealer > box {
+    padding: 8px;
+    border-spacing: 12px;
+  }
 
-  &.action:hover {
+  &.action:hover > revealer > box {
       background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 47%), 30%),
                         desaturate(darken(invert($selected_bg_color), 42%), 70%));
-      border-color: lighten($borders_color, 10%);
   }
+
   &.info,
   &.question,
   &.warning,
   &.error {
-    &:backdrop, & {
-      label, & { color: $fg_color; }
-      background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 45%), 30%), 
-                        desaturate(darken(invert($selected_bg_color),40%), 70%));
-      border-color: lighten($borders_color, 10%);
-    }
-
-    text-shadow: none;
-
-    &:backdrop { text-shadow: none; }
     > revealer > box {
-      padding-top: 8px; padding-bottom: 8px;
       border-bottom: 1px solid lighten($borders_color, 5%);
-      border-spacing: 12px;
-    }
-    > revealer { padding-left: 8px; padding-right: 8px; }
-
-    button {
-      // FIXME: extend selection mode buttons
-      @include button(normal, $bg_color, $fg_color, none);
-
-      &:hover { @include button(hover, $bg_color, $fg_color, none); }
-
-      &:active,
-      &:checked { @include button(active, $bg_color, $fg_color, none); }
-
-      &:disabled { @include button(insensitive,$bg_color,$fg_color,none); }
-
-      &:backdrop {
-        @include button(backdrop, $bg_color, $fg_color, none);
-        border-color: _border_color($bg_color);
-
-        &:disabled {
-          @include button(backdrop-insensitive, $bg_color,
-                          $fg_color, none);
-          border-color: _border_color($bg_color);
-        }
-      }
-      &:backdrop, & {
-        label, & { color: $fg_color; }
-      }
+      background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 45%), 30%), 
+                        desaturate(darken(invert($selected_bg_color), 40%), 70%));
     }
-
-    selection { background-color: darken($bg_color, 10%); }
-
-    *:link { color: $link_color; }
   }
 }